﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/AdminMaster.Master" AutoEventWireup="true" CodeBehind="ManageQuestionnaires.aspx.cs" Inherits="MyHealthOnline.Administrators.ManageQuestionnaires" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="updQuestionnaires" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:GridView id="grdQuestionnaires" runat="server" DataKeyNames="Id" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="4" 
                DataSourceID="QuestionnaireObjectDataSource" 
                GridLines="Horizontal" onrowcommand="grdQuestionnaires_RowCommand" 
                BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" 
                EmptyDataText="No Questionnaires available">
                <Columns>
                    <asp:CommandField ShowEditButton="True" />
                    <asp:BoundField DataField="QuestionText" HeaderText="QuestionText" 
                        SortExpression="QuestionText"></asp:BoundField>
                    <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type">
                    </asp:BoundField>
                </Columns>
                <FooterStyle BackColor="White" ForeColor="#333333" />
                <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="White" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                <sortedascendingcellstyle backcolor="#F7F7F7" />
                <sortedascendingheaderstyle backcolor="#487575" />
                <sorteddescendingcellstyle backcolor="#E5E5E5" />
                <sorteddescendingheaderstyle backcolor="#275353" />
                <sortedascendingcellstyle backcolor="#F7F7F7" />
                <sortedascendingheaderstyle backcolor="#487575" />
                <sorteddescendingcellstyle backcolor="#E5E5E5" />
                <sorteddescendingheaderstyle backcolor="#275353" />
            </asp:GridView>
            <asp:ObjectDataSource ID="QuestionnaireObjectDataSource" runat="server" 
                SelectMethod="GetQuestionnaires" 
                TypeName="MyHealthOnline.Business.QuestionnaireBusiness">
            </asp:ObjectDataSource>
            <br />
            Title: &nbsp;
            <asp:Textbox id="txtTitle" runat="server" Text=""></asp:Textbox>
            <br />
            <asp:Button id="btnAdd" runat="server" Text="Add Questionnaire" onclick="btnAdd_Click" />
        </ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>
